-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LensFlare: parameterize number of occlusion steps #3234
Conversation
There is a significant amount of CPU time taken when checking for occlusions in the LensFlare compositor listener. This exposes the number of steps taken when checking occlusions to allow users to attempt to speed up this process. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
The SetCamera call passes the current parameters to the compositor listener, so make sure that it is called last. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
this is ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, only some minor comments
gazebo/rendering/LensFlare.cc
Outdated
|
||
/// \brief Number of steps to take in each direction when checking for | ||
/// occlusion. | ||
public: double occlusionSteps = 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public: double occlusionSteps = 10; | |
public: double occlusionSteps = 10.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gazebo/rendering/LensFlare.cc
Outdated
@@ -356,6 +367,9 @@ namespace gazebo | |||
public: ignition::math::Vector3d lensFlareColor | |||
= ignition::math::Vector3d(1.0, 1.0, 1.0); | |||
|
|||
/// \brief Color of lens flare. | |||
public: double lensFlareOcclusionSteps = 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public: double lensFlareOcclusionSteps = 10; | |
public: double lensFlareOcclusionSteps = 10.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plugins/LensFlareSensorPlugin.cc
Outdated
@@ -40,6 +40,9 @@ namespace gazebo | |||
public: ignition::math::Vector3d color | |||
= ignition::math::Vector3d(1.4, 1.2, 1.0); | |||
|
|||
/// \brief Lens flare occlusion steps | |||
public: double occlusionSteps = 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public: double occlusionSteps = 10; | |
public: double occlusionSteps = 10.0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…e_occlusion_steps
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Some testing of the LensFlare effects has indicated that the number of steps used when checking for occlusions in
LensFlareCompositorListener::OcclusionScale
is impacting performance. To investigate, I've exposed it as a parameter in therendering::LensFlare
c++ API and as an XML parameter<occlusion_steps>
to theLensFlarePlugin
.